package com.example.sellersale.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@TableName("sys_cartinfo")
public class CartInfo {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;//购物车信息id
    private String goodsId;//商品id
    private Double price;//价格
    private Integer count;//商品数量
    private String userId;//用户
    //用户和记录是一对多的关系
    private User user;//用户详细信息
    //商品和购物车信息1----1的关系
    private Goods goods;

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }


    @Override
    public String toString() {
        return "CartInfo{" +
                "id='" + id + '\'' +
                ", goodsId='" + goodsId + '\'' +
                ", price=" + price +
                ", count=" + count +
                ", userId='" + userId + '\'' +
                ", user=" + user +
                ", goods=" + goods +
                '}';
    }
}
